#include<iostream>
#include<algorithm>
using namespace std;
string fun(string x,string y){
    reverse(x.begin(),x.end());
    reverse(y.begin(),y.end());
    string z;
    int k,r=0,m=x.length(),n=y.length();
    for(int i=0;i<n;i++){
        if(i<m&&i<n)k=x[i]+y[i]-'0'*2+r;
        else if(i<m)k=x[i]-'0'+r;
        else if(i<n)k=y[i]-'0'+r;
        z+=k%10+'0';
        r=k/10;
    }
    if(r!=0)z+=r+'0';
    reverse(z.begin(),z.end());
    return z;
}
int main(){
    // string num1="12345",num2="678910";
    string num1,num2;
    for(int i=1;i<=100000;i++)
        if(i<60000)num1+=to_string(i);
        else num2+=to_string(i);
    cout<<fun(num1,num2)<<endl;
    return 0;
}
